home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
C++
/
Frameworks
/
Sprocket Framework DR2
/
About Sprocket
next >
Wrap
Text File
|
1996-06-16
|
6KB
|
198 lines
Welcome to Sprocket!
This is the second official public release, and represents a very stable and
robust release. Sprocket development is continuing on a daily basis, and you are
welcomed and encouraged to enhance Sprocket with your fixes, additions, or
optimizations. Sprocket is already being using in commercial applications, and
the number of people using Sprocket is growing rapidly.
What is Sprocket?
-----------------
Sprocket is a C++ application framework. The
goals in mind when it was in development were the following:
• Easy to understand, easy to learn
• Takes advantage of cutting-edge features like Apple Guide, QuickDrawGX, Thread manager, and MacOS 8 calls if available
• Compact (the Sprocket Framework is only 20 files)
• Easy to extend
I believe that all of these goals have been attained. Sprocket is very easy to
learn because it gives you what every commercial or in-house application needs,
and not anything more. Sprocket does not suffer from framework bloat like
PowerPlant and the Think Class Library (about 100-200 files depending on the
version). The Sprocket samples will compile from scratch, including building its
own precompiled headers and compiling Sprocket, in about 70 seconds on a
PowerMacintosh 7200/90. Try that with TCL! Finally, adding or extending
functionality is very straight-forward. thanks to its clean code and the C++
architecture.
How is Sprocket set up?
-----------------------
A typical Sprocket application (here, the SprocketNothing project was chosen)
consists of the following files, organized by segment:
Sprocket Nothing
SprocketNothingHeaders.pch
SprocketNothing.cp
SprocketNothing.rsrc
Sprocket Core
SprocketMain.cp
AEFutures.cp
AEHandling.cp
AEThreads.cp
Semaphores.cp
ThreadContext.cp
File.cp
DynamicArray.cp
LinkedList.cp
SortedDynamicArray.cp
DialogWindow.cp
MenuBar.cp
SplashWindow.cp
Window.cp
Sprocket Utils
UDialog.cp
UDrag.cp
UGuide.cp
UPrinting.cp
UResources.cp
UString.cp
Sprocket Optional Classes
DocumentWindow.cp
SerialNumberProtection.cp
SpokenCommandHandler.cp
Preferences.cp
MultiPanelDialogWindow.cp
Sprocket Resources
Sprocket.rsrc
StandardMenus.rsrc
Sprocket Libraries
console.stubs.c
MWCRuntime.Lib
AppSystem7orMacOS8.stubs
AGFileLibPPC
AOCELib
ThreadsLib
SpeechLib
SpeechRecognitionLib
Now let's take these files one at a time at describe thier usage.
App-Specific Code (your code goes here)
---------------------------------------
SprocketNothingHeaders.pch build the applications precompiled headers. It
includes the file BuildConditionals.h, an important file were global defines are
set which affect which features your application will support. YOU PROVIDE THIS
FILE, which can be named whatever you want.
SprocketNothing.cp is the file which implements the required functions of a
Sprocket application. You can find defines for these functions in Sprocket.h.
YOU PROVIDE THIS FILE, which can be named whatever you want.
SprocketNothing.rsrc the application-specific resources file which you provide.
YOU PROVIDE THIS FILE, which can be named whatever you want.
Sprocket Core Classes
---------------------
SprocketMain.cp contains the core Macintosh application code. In here you will
find main(), the setup and teardown routines, as well as the actual event loop.
AEFutures.cp implements the asyncronous Apple Events support, otherwise known as
futures.
AEHandling.cp provides general Apple Event support for the required suite and the
display manager suite.
AEThreads.cp is a utility class to support the futures package.
Semaphores.cp is a utility class to support the futures package.
ThreadContext.cp is a utility class to support the futures package.
File.cp is a file class which handles creating, reading, deleting, and other file
functions.
LinkedList.cp implements a standard linked list of void pointers.
DynamicArray.cp implements a standard dynamic array of void pointers.
SortedDynamicArray.cp is a subclass of TDynamicArray which provides a sorting
mechanism. Any subclass of this can provide their own sorting mechanism.
DialogWindow.cp is a subclass of TWindow which uses DLOG and DITL resources to
build its contect.
MenuBar.cp handles all menubar related functions, including enabling/disabling of
menu items, adding/removing menus from the menubar, etc. TMenuBar takes
advantage of CMNUs, so use them instead of MENUs.
SplashWindow.cp handles the splash window and the status line in it.
Window.cp is a full-featured generic window class.
Sprocket Utilities
------------------
UDialog.cp provide the alert, dialog, and error reporting functions, as well as
the standard dialog filter procs.
UDrag.cp includes some handy Drag and Drop functions.
UGuide.cp allows for easy opening of application Apple Guide files.
UPrinting.cp provides a filter for the QuickDraw GX moveable modal printing
dialog box.
UResources.cp is a set of compatibility function which call System 7 or MacOS 8
resource manager routines based on a runtime system version check.
UString.cp is a standard set of string manipulation functions.
Sprocket Optional Classes
-------------------------
DocumentWindow.cp is a class which implement a document-based window which
provides saving and printing routines (both QuickDraw and GX!).
SerialNumberProtection.cp provides application registration and network serial
number protection.
SpokenCommandHandler.cp processes speech and turns spoken commands into Sprocket
commands.
Preferences.cp handles a prefs file based in the prefs folder.
MultiPanelDialogWindow.cp implements a dialog window which has multiple panel
which can be selected via a control.
Sprocket Resources
------------------
Sprocket.rsrc is a required set of resources for the Sprocket Framework.
StandardMenus.rsrc is a template of commonly used menus.
Sprocket Libraries
------------------
AppSystem7orMacOS8.stubs should be included if you are using the MacOS 8
headers and libraries. If you are using the older libraries, remove this file
and include the standard Mac libraries from System 7.
console.stubs.c
MWCRuntime.Lib
AGFileLibPPC
AOCELib
ThreadsLib
SpeechLib
SpeechRecognitionLib